package toolCategories

import androidx.compose.material.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import kotlinx.coroutines.runBlocking
import org.jetbrains.compose.resources.getString
import org.jetbrains.compose.resources.painterResource
import tool.Tool
import tool.json.JsonToKotlinTool
import top.mcwebsite.devtoolbox.devtoolbox.generated.resources.Res
import top.mcwebsite.devtoolbox.devtoolbox.generated.resources.json

object JsonToolCategory : ToolCategory {

    private val _name: String by lazy {
        runBlocking {
            getString(Res.string.json)
        }
    }

    override fun getName(): String {
        return _name
    }

    override fun getTools(): List<Tool> {
        return listOf(JsonToKotlinTool)
    }

    @Composable
    override fun ToolCategoryIcon(modifier: Modifier) {
        Icon(painterResource(Res.drawable.json), contentDescription = null, modifier = modifier)
    }
}